function xmlFindJs(method, url,methodName, data = null) {
    let xmlHttpRequest = new XMLHttpRequest()
    xmlHttpRequest.open(method, url)
    xmlHttpRequest.send()
    xmlHttpRequest.onreadystatechange = function () {
        methodName(xmlHttpRequest.responseText)
    }
}

function xmlFindJq(method, url, methodName,data = null ) {
    $.ajax({
        type: method,
        url: url,
        data: data,
        success: function (data) {
            methodName(data)
        }
    })
}

function axiosFind(method, url, methodName) {
    axios({
        method: method,
        url: url,
    }).then(res => {
        methodName(res)
        return res
    }).catch(error => {
        return error
    })
}
export {
    xmlFindJs,
    xmlFindJq,
    axiosFind,
}